/*	Copyright 2007 - Xavier Baro (xbaro@cvc.uab.cat)

	This file is part of eapmlib.

    Eapmlib is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or any 
	later version.

    Eapmlib is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __INTIMAGEDATADATA_H__
#define __INTIMAGEDATADATA_H__

#include "EvolutiveLib.h"
#include "Data.h"
namespace Evolutive {

	class EVOLUTIVELIB_API CIntImageData : public CData
	{
		//! Methods
	public:
		//! Default constructor		
		CIntImageData(void);

		//! Default destructor
		virtual ~CIntImageData(void);	

#ifdef USE_OPENCV
		//! Extended constructors
		CIntImageData(IplImage *IntImage);
		CIntImageData(IplImage *IntImage,IplImage *RIntImage);

		//! Returns the integral image
		IplImage *GetIntImage(void);

		//! Returns the rotated integral image
		IplImage *GetRotatedIntImage(void);

		//! Set a region of interest
		void SetROI(CvRect ROI);

		//! Returns a pointer to the region of interest
		CvRect* GetROI(void);

		//! Remove the ROI
		void ResetROI(void);

		//! Returns the offset over the image
		int GetOffset(void);

		//! Sets the scale value
		void SetScale(double Scale);

		//! Returns the scale value
		double GetScale(void);

	protected:
	
#endif //USE_OPENCV	
		//! Attributes
	protected:		

		//! Region of interest
		CvRect *m_ROI;	

		//! Scale value
		double m_Scale;
	};	
}

#endif // __INTIMAGEDATADATA_H__
